package com.yixq.soa.service.user.service.impl;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.yixq.soa.service.comm.ResultData;
import com.yixq.soa.service.comm.utils.PageConverterUtils;
import com.yixq.soa.service.comm.vo.PageVo;
import com.yixq.soa.service.queryvo.TbActivityQueryVo;
import com.yixq.soa.service.requestvo.TbActivityInsertVo;
import com.yixq.soa.service.requestvo.TbActivityUpdateVo;
import com.yixq.soa.service.resultvo.TbActivityResultVo;
import com.yixq.soa.service.user.dao.TbActivityMapper;
import com.yixq.soa.service.user.entity.TbActivity;
import com.yixq.soa.service.user.service.TbActivityService;
import com.yixq.soa.service.web.utils.PageParam;

@Service
public class TbActivityServiceImpl implements TbActivityService {

	@Autowired
	private TbActivityMapper tbActivityMapper;

	@Override
	public PageVo<TbActivityResultVo> selectTbActivityList(TbActivityQueryVo query, PageParam pageParam) {

		if (StringUtils.isNotBlank(query.getName())) {
			query.setName("%" + query.getName() + "%");
		}
		PageList<TbActivityResultVo> pageList = tbActivityMapper.selectListPageByQuery(query,
				pageParam.getPageBounds());
		return PageConverterUtils.convert2PageVo(pageList);
	}

	@Override
	public ResultData<TbActivityInsertVo> insert(TbActivityInsertVo vo) {
		TbActivity entity=new TbActivity();
		return null;
	}

	@Override
	public ResultData<Boolean> updateSection(TbActivityUpdateVo vo) {
		return null;
	}

}
